package com.nisum.mocksimulator.consumer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Component;

@Component
public class MainConsumerService {
	@Autowired
	CarConsumerService carConsumerService;

	public static void main(String[] args) {

		@SuppressWarnings("resource")
		ApplicationContext ctx = new ClassPathXmlApplicationContext(
				"com/nisum/mocksimulator/config/carservicecontext.xml");

		MainConsumerService main = ctx.getBean(MainConsumerService.class);
		main.initService();
	}

	private void initService() {
		carConsumerService.initService();
	}
}
